package com.simon.spark.helloworld

import org.apache.spark.{SparkConf, SparkContext}

object HelloWorld {
  def main(args: Array[String]): Unit = {
    val conf=new SparkConf().setAppName("helloworld").setMaster("local[2]")

    val sc=new SparkContext(conf)
    sc.textFile("e:\\11.log").flatMap(_.split(" ")).map((_,1)).reduceByKey(_+_).sortBy(_._2,false).foreach(
      {println(_)}
    )

  }

}
